package com.sgb.jicai.entity;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Time:2021/7/20
 * AUTHOR:F_Q
 * Description:物流集合
 */
public class DetailsBean implements Serializable {
    private String  brandsName;//品牌
    private String  brandsNo;//品牌no
    private String  lowBuy;//起始采购量
    private String  unit;//单位no
    private List<PriceRulesBean>  priceRules;//价格规则集合
    private String  originalPrice;//原价
    private List<AttrsBeans> attrs;
    private String  slot;//原价
    private String  name;//名称
    private String  unitName;//单位名称

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getUnitName() {
        if (TextUtils.isEmpty(unitName)){
            return "";
        }else {
            return unitName;
        }
    }

    /**
     * "details":[
     * {"brandsName":"金正",
     *  "brandsNo":3643,
     *  "lowBuy":1,
     *  "unit":"1",
     *  "priceRules":[{"intervalStartValue":"1.000","intervalEndValue":"555.000","price":"666","sort":1}],
     *  "originalPrice":"333",
     *  "attrs":[
     *  {"attribute":1045,"value":"φ12","no":6206,"name":"规格","sku":1,"parentId":1045},{attribute='1045', valId='6206', val='φ12', isOnClick=true}
     *  {"attribute":1046,"value":"过磅","no":6210,"name":"计量方式","sku":1,"parentId":1046},
     *  {"attribute":1047,"value":"HRB400","no":6212,"name":"材质","sku":1,"parentId":1047}
     *  ],
     *  "slot":"0"
     *  }
     *  ]
     * @return
     */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DetailsBean(String brandsName, String brandsNo, String lowBuy, String unit, List<AttrsBeans> attrs, String name,String unitName) {
        this.brandsName = brandsName;
        this.brandsNo = brandsNo;
        this.lowBuy = lowBuy;
        this.unit = unit;
        this.attrs = attrs;
        this.name = name;
        this.unitName = unitName;
    }

    public String getBrandsName() {
        return brandsName;
    }

    public void setBrandsName(String brandsName) {
        this.brandsName = brandsName;
    }

    public String getBrandsNo() {
        return brandsNo;
    }

    public void setBrandsNo(String brandsNo) {
        this.brandsNo = brandsNo;
    }

    public String getLowBuy() {
        return lowBuy;
    }

    public void setLowBuy(String lowBuy) {
        this.lowBuy = lowBuy;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public List<PriceRulesBean> getPriceRules() {
        return priceRules;
    }

    public void setPriceRules(List<PriceRulesBean> priceRules) {
        this.priceRules = priceRules;
    }

    public String getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(String originalPrice) {
        this.originalPrice = originalPrice;
    }

    public List<AttrsBeans> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<AttrsBeans> attrs) {
        this.attrs = attrs;
    }

    public String getSlot() {
        return slot;
    }

    public void setSlot(String slot) {
        this.slot = slot;
    }

    @Override
    public String toString() {
        return "{" +
                "brandsName='" + brandsName + '\'' +
                ", brandsNo='" + brandsNo + '\'' +
                ", lowBuy='" + lowBuy + '\'' +
                ", unit='" + unit + '\'' +
                ", priceRules=" + priceRules +
                ", originalPrice='" + originalPrice + '\'' +
                ", attrs=" + attrs +
                ", slot='" + slot + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
